//
//  LLCountDownButton.h
//  walletSDK12580
//
//  Created by Xu Yefeng on 13-6-20.
//  Copyright (c) 2013年 LianLian. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LLColorButton.h"

@protocol  LLCountDownButtonDelegate<NSObject>

// 倒计时回调，修改界面
- (void)timeLeft:(int)leftTimeInterval;

// 停止时候，修改界面
- (void)timerStoped;

@end

@interface LLCountDownButton : LLColorButton
{
    NSTimeInterval timeInterval;
}

@property (nonatomic, assign) int countdownInterval;

@property (nonatomic, retain) NSObject<LLCountDownButtonDelegate> *delegate;

- (void)start;
- (void)stop;
- (BOOL)isTimerOver;

@property (nonatomic, strong) NSDate *startTime;
@property (nonatomic, strong) NSTimer *timer;
@property (nonatomic, strong) NSString *timerKey;

// 重写此函数，实现界面数字更替
- (void)timeLeft:(int)leftTimeInterval;

// 重写此函数，实现停止时候的界面切换
- (void)timerStoped;

+ (instancetype)countDownButtonWithTimerKey:(NSString*)timerKey;

@end
